﻿
@{
    ViewBag.Title = Resources.WebStringsWeb.WebTitle;
    Layout = "~/Views/Shared/_LayoutMobile.cshtml";
}

@section css {
    <link href="~/Assets/css/previewImage.css" rel="stylesheet" />
    <link href="~/Assets/css/mui.picker.min.css" rel="stylesheet" />
    <script src="~/Assets/js/mui.picker.js"></script>
    <script src="~/Assets/js/mui.picker.min.js"></script>
    <script src="~/Assets/js/mui.dtpicker.js"></script>
    <style>
        .mui-bar ~ .mui-content .mui-scroll-wrapper {
            top: 44px;
            height: auto;
        }

        .btn_addPic {
            display: block;
            position: relative;
            width: 53px;
            height: 53px;
            overflow: hidden;
            cursor: pointer;
            text-align: center;
        }

        .filePrew {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 53px;
            height: 53px;
            opacity: 0;
        }
    </style>
}
<header class="mui-bar mui-bar-nav">
    <button id="back" type="button" class="mui-left mui-action-back mui-btn mui-btn-link mui-btn-nav mui-pull-left" style="color:white;">
        <span class="mui-icon mui-icon-left-nav" style=""></span>
    </button>
    <h1 class="mui-title" style="color:white;">设施设备维保</h1>
</header>

<div class="mui-content" style="margin: 5px;" ng-cloak ng-controller="FacAndEquController" ng-init="
     DeviceId='@(Request.QueryString["DeviceId"].IsEmpty() ? "" : Request.QueryString["DeviceId"])';
     PlaceId='@(Request.QueryString["PlaceId"].IsEmpty() ? "" : Request.QueryString["PlaceId"])';
     RoomId='@(Request.QueryString["RoomId"].IsEmpty() ? "" : Request.QueryString["RoomId"])';
     PlaceName='@(Request.QueryString["PlaceName"].IsEmpty() ? "" : Request.QueryString["PlaceName"])';
     Loading = false;
     InitDatePicker('#MaintainceDate');
     InitDatePicker('#NextDate');
     GetEquDetail(DeviceId);
     AddModel.DeviceId=DeviceId;
     AddModel.MaintainceDate = '@DateTime.Now.ToString("yyyy-MM-dd")';
     pagename ='@(Request.QueryString["pagename"].IsEmpty() ? "" : Request.QueryString["pagename"])';
     backurl = 'MFacAndEquPlaceDetail?RoomId='+RoomId+'&PlaceId='+PlaceId+'&PlaceName='+PlaceName+'#item2';

     ">
    <form class="mui-input-group">
        <div class="mui-input-row">
            <label>设备名称</label>
            <input type="text" placeholder="" ng-model="EquModel.DeviceName" disabled />
        </div>
        <div class="mui-input-row">
            <label>设备号</label>
            <input type="text" placeholder="" ng-model="EquModel.DeviceNo" disabled />
        </div>
        <div class="mui-input-row">
            <label>设备类型</label>
            <input type="text" placeholder="" ng-model="EquModel.TypeName" disabled />
        </div>
        <div class="mui-input-row">
            <label>所在场所</label>
            <input type="text" placeholder="" ng-model="EquModel.PlaceName" disabled />
        </div>
        <div class="mui-input-row">
            <label>管理部门</label>
            <input type="text" placeholder="" ng-model="EquModel.DepartmentName" disabled />
        </div>
        <div class="mui-input-row">
            <label>管理频次</label>
            <input type="text" placeholder="" ng-model="EquModel.ManageInterval" disabled />
        </div>
        <div class="mui-input-row">
            <label>维保公司</label>
            <input type="text" placeholder="" ng-model="EquModel.CompanyName" disabled />
        </div>
        <div class="mui-input-row">
            <label>维保频次</label>
            <input type="text" placeholder="" ng-model="EquModel.MaintenanceInterval" disabled />
        </div>
        <div class="mui-input-row">
            <label>上次维保时间</label>
            <input type="text" placeholder="" value="{{EquModel.LastMaintance.MaintainceDate|JSONDate:'yyyy-MM-dd'}}" disabled />
        </div>
    </form>

    <form class="mui-input-group">
        <div class="mui-input-row">
            <label>本次维保日期</label>
            <input id="MaintainceDate" type="text" data-options='{"type":"date"}' placeholder="本次维保日期" ng-model="AddModel.MaintainceDate" />
        </div>
        <div class="mui-input-row">
            <label>下次维保日期</label>
            <input id="NextDate" type="text" data-options='{"type":"date"}' placeholder="下次维保日期" ng-model="AddModel.NextDate" />
        </div>

    </form>
    <div class="mui-input-row" style="margin: 10px 5px;">
        <textarea id="textarea" rows="5" placeholder="备注" ng-model="AddModel.Remark"></textarea>
    </div>
    <div class="mui-button-row">
        <button type="button" ng-click="MAddMaintanceRecord(AddModel,pagename,backurl);" ng-disabled="Loading" class="mui-btn mui-btn-primary mui-btn-block">提 &nbsp;&nbsp;交</button>
    </div>
    <div style="height:80px;">
        
    </div>
</div>
@section js{
    <script src="~/Assets/js/libs/upload.js"></script>
    <script src="~/Assets/js/mui.zoom.js"></script>
    <script src="~/Assets/js/mui.previewimage.js"></script>
    <script src="~/Assets/js/pg/FacAndEqu.js?v=@DateTime.Now.ToString("yyyyMMddHH")"></script>
    <script>

        mui.showLoading("正在加载..", "div");

        setTimeout(function () {
            mui.hideLoading();
            mui.previewImage();
        }, 2000);
    </script>
}


